{% extends "wechat/layout.html" %}

{#<head>#}
{#    <style>#}
{#        a{ text-decoration:none} {# 去掉 a 跳转标签的下划线 #}
{#    </style>#}
{#</head>#}

{% set title = '学习记录' %}
{% block contents %}
    <div class="evaluation-wrapper evaluation-wrapper2">
        <div class="evaluation-content content">
            <div class="student-info">
                <div class="stat">
                    <div class="agent">{{ title_info.school_name }}</div>
                    <div class="teacher">教师: {{ title_info.teacher_name }}</div>
                </div>

                <div class="stu">
                    <p class="name">{{ title_info.student_name }}</p>
                    <span class="date">{{ title_info.session_date }}</span>
                </div>
            </div>

            {% for d in data %}
                <div class="score-content">
                    <div class="score-info">
                        <div class="step">
                            <div class="title">{{ d.map }}<br>{{d.evaluation }}</div>
                            <div class="cont">
                                <span class="score">{{ d.avg_score }}分</span>
                            </div>
                        </div>
                        <div class="image-desc">
                            {% if d.remark_class.startswith('great')%}
                                <img src="{{ url_for('static', filename='images/perfect.png') }}" alt="">
                            {% elif d.remark_class.startswith('very-good')%}
                                <img src="{{ url_for('static', filename='images/good.png') }}" alt="">
                            {% elif d.remark_class.startswith('good')%}
                                <img src="{{ url_for('static', filename='images/pass.png') }}" alt="">
                            {% elif d.remark_class.startswith('nopass')%}
                                <img src="{{ url_for('static', filename='images/bad.png') }}" alt="">
                            {% elif d.remark_class.startswith('unfinished')%}
                                <img src="{{ url_for('static', filename='images/unfinished.png') }}" alt="">
                            {% else %}
                                <img src="{{ url_for('static', filename='images/unknow.png') }}" alt="">
                            {% endif %}
                        </div>
                    </div>
                    <div class="score-detail">
                    <ul class="lists">
                        <li class="item">
                            <span class="title" id={% if 'evaluation_score' in d.lessons[1]%}{{ d.lessons[1].evaluation_score.activity_id }}{% endif %}>
                                演奏
                                {% if 'evaluation_score' in d.lessons[1] and d.lessons[1].evaluation_score.exist_pic %}
                                  <a href="{{ url_for('wechat.record_images', active_id=d.lessons[1].evaluation_score.activity_id ) }}">
                                      <i data-modal-id="" class="iconfont icon-file"></i>
                                  </a>
                                {% endif %}
                            </span>
                            <span class="sub">
                                {% if 'evaluation_score' not in d.lessons[1] %}
                                    {{translate('未进行')}}
                                {% else %}
                                    {{ d.lessons[1].evaluation_score._score }}分
                                {% endif %}
                            </span>
                        </li>
                        <li class="item">
                            <span class="title">乐理</span>
                            <span class="sub">
                                {% if 'evaluation_theory' not in d.lessons[1] %}
                                    {{translate('未进行')}}
                                {% else %}
                                    {{ d.lessons[1].evaluation_theory._score }}分
                                {% endif %}
                            </span>
                        </li>
                        <li class="item">
                            <span class="title">听力</span>
                            <span class="sub">
                                {% if 'evaluation_listen' not in d.lessons[1] %}
                                    {{translate('未进行')}}
                                {% else %}
                                    {{ d.lessons[1].evaluation_listen._score }}分
                                {% endif %}
                            </span>
                        </li>
                    </ul>
                </div>
                </div>
            {% endfor %}
        </div>
    </div>
{% endblock %}
